import qs from 'qs'
// console.log(qs);
const parseSearch = (search) =>{
  if(!search){
    throw(new Error('传入search类型参数'))
  }
  return qs.parse(search.substr(1))
}

// 取token判断是否登录
const isLogin = () => !!localStorage.getItem('token')

export {
  parseSearch,
  isLogin
}